
package org.finegold.core.netty.server.modules.login.handler;


import io.netty.channel.Channel;
import org.finegold.core.netty.core.annotion.SocketCommand;
import org.finegold.core.netty.core.annotion.SocketModule;
import org.finegold.core.netty.core.session.Session;
import org.finegold.core.netty.server.modules.login.cmd.LoginCmd;
import org.finegold.core.netty.server.modules.login.cmd.ModuleId;

/**
 * Description: 登录模块
 *
 * @author QinYueFeng
 * @since: 1.0
 * Create Date Time: 2018/7/16 16:08
 * Update Date Time:
 */
@SocketModule(module = ModuleId.LOGIN)
public  interface  LoginHandler {

    /**
     * 登录
     *
     * @param session session
     * @param data    data
     * @return
     */
    @SocketCommand(cmd = LoginCmd.USER_LOGIN)
    void login(Session session, byte[] data, Channel channel);

    /**
     * 登出
     * @param session
     * @param data
     * @param channel
     */
    @SocketCommand(cmd = LoginCmd.USER_LOGOUT)
    void logout(Session session, byte[] data, Channel channel);
}
